﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Islamic_influence_in_Venetian_cuture.LangResources;

namespace Islamic_influence_in_Venetian_cuture
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Costruttore
        public MainPage()
        {
            Lang.CurrentCulture = Cultures.English;
            DataContext = new Lang();
            InitializeComponent();
        }



        private void English_Click(object sender, RoutedEventArgs e)
        {
            Culture.Current = Cultures.English;
            DataContext = new Lang();
            goToIntro();
        }

        private void Italiano_Click(object sender, RoutedEventArgs e)
        {
            Culture.Current = Cultures.Italiano;
            DataContext = new Lang();
            goToIntro();
        }

        private void Arabic_Click(object sender, RoutedEventArgs e)
        {
            Culture.Current = Cultures.Arabic;
            DataContext = new Lang();
            goToIntro();
        }

        private void Farsi_Click(object sender, RoutedEventArgs e)
        {
            Culture.Current = Cultures.Persian;
            DataContext = new Lang();
            goToIntro();
        }

        private void goToIntro()
        {
            //NavigationService.Navigate(new Uri("/View/InfluencePivotMenu.xaml", UriKind.Relative));
            NavigationService.Navigate(new Uri("/View/VideoIntro.xaml", UriKind.Relative));
        }
        private void Arabic_bar_Click(object sender, EventArgs e)
        {
            LangResources.Lang.CurrentCulture = LangResources.Cultures.Arabic;
        }

        private void English_bar_Click(object sender, EventArgs e)
        {
            LangResources.Lang.CurrentCulture = LangResources.Cultures.English;
        }

        private void Farsi_bar_Click(object sender, EventArgs e)
        {
            LangResources.Lang.CurrentCulture = LangResources.Cultures.Persian;
        }

        private void Italian_bar_Click(object sender, EventArgs e)
        {
            LangResources.Lang.CurrentCulture = LangResources.Cultures.Italiano;
        }
    }
}